<template>
    <h3>组合式api</h3>
    <p>{{ msg }}</p>
    <p>{{ userinfo }}</p>
    <p :class="msg3">123</p>
</template>


<script>
import {ref,reactive} from "vue"
//ref基本类型响应数据

//reactive引用类型响应数据：Array Object

export default{
    //组合式api的关键字
    setup(){
        const msg=ref("组合式api：msg")
        const msg3=ref(false)
        const userinfo=reactive({
            name:"woshi",
            age:18
        })

        
        return{
            msg,
            userinfo,
            msg3

        }
    }

}


</script>